<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
	response.setContentType("text/html;charset=UTF-8");
%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath();
%>
<html lang="zh-cn">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no, email=no" />
<title>登录</title>
<link rel="stylesheet" href="<%=path %>/admin/css/pintuer.css">
<link rel="stylesheet" href="<%=path %>/admin/css/admin.css">
<script type="text/javascript"> var paths = '<%=path%>'; </script>
<script src="<%=path %>/admin/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/static/js/jquery-3.2.1.min.js"></script>
<script src="<%=path %>/admin/js/pic.js"></script>
<script type="text/javascript" src="<%=path%>/admin/js/lrz.bundle.js"></script>
<script type="text/javascript" src="<%=path%>/admin/js/lrz.all.bundle.js"></script>
<script type="text/javascript" src="<%=path%>/admin/js/1.chunk.js"></script>
<script type="text/javascript" src="<%=path%>/admin/js/2.chunk.js"></script>
<script type="text/javascript" src="<%=path %>/admin/js/admin.js"></script>

</head>
<body>
	<div class="panel admin-panel">
        <div class="panel-head" id="add">
            <strong><span class="icon-pencil-square-o"></span>反馈详情</strong>
        </div>
        <div class="body-content">
            <form id="planForm" method="post" class="form-x" action="<%=path %>/platfrom/save">
            <input type="hidden" value="${bFeedback.id}" name="id" id="id"/>
            <div class="form-group">
                    <div class="label">
                        <label>姓名：</label>
                    </div>
                    <div class="field">
                        <input   disabled type="text" class="input w50 clear" value="${bFeedback.name}" name="name" id="name"/>
                        <div class="tips"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>时间：</label>
                    </div>
                    <div class="field">
                        <input   disabled type="text" class="input w50 clear"  value="<fmt:formatDate value='${bFeedback.createTime}' pattern='yyyy-MM-dd  HH:mm:ss'/>" name="name" id="name"/>
                        <div class="tips"></div>
                    </div>
                </div>
                
                <div class="form-group">
                    <div class="label">
                        <label>手机号：</label>
                    </div>
                    <div class="field">
                        <input   disabled type="text" class="input w50 clear" value="${bFeedback.phone}" name="name" id="name"/>
                        <div class="tips"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>操作目的：</label>
                    </div>
                    <div class="field">
                        <textarea disabled class="input w50 clear" style="height: 130px; overflow-y: scroll;"
                            name="description" id="description">${bFeedback.operation}</textarea>
                        <div class="tips"></div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="label">
                        <label>错误描述：</label>
                    </div>
                    <div class="field">
                        <textarea disabled class="input w50 clear" style="height: 130px; overflow-y: scroll;"
                            name="description" id="description">${bFeedback.description}</textarea>
                        <div class="tips"></div>
                    </div>
                </div>
                <c:if test="${not empty bFeedback.imgUrl}">
                       <div class="form-group">
                            <div class="label">
                                <label>图片：</label>
                            </div>
                            <c:forEach items="${imgUrl}" var="item" varStatus="vs">
                            <div class="field" style="min-height: 1px">
                                <img src="<%=path%>/file/getImg.html?saveAddress=${item}" style="width:50%" id="idCard" name="idCard">
                                <span><a class="downloadImage" href="javascript:void(0);">下载图片</a></span>
                            </div>
                            </c:forEach>
                        </div>
                 </c:if>
                 <div class="form-group" id="shenhe">
                    <div class="label">
                        <label></label>
                    </div>
                    <div class="field">
                        <c:if test="${bFeedback.state eq 1}">
                           <button class="button bg-main  authentication1" type="button" state="2">已受理</button>
                           <button class="button bg-main  authentication1" type="button" state="3">已解决</button>
                        </c:if>
                        <c:if test="${bFeedback.state eq 2}">
                           <button class="button bg-main  authentication1" type="button" state="3">已解决</button>
                        </c:if>
                    </div>
                </div>
                </div>
            </form>
        </div>
    </div>
</body>
<script type="text/javascript" src="<%=path%>/static/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/admin/js/layer/layer.js" ></script>
<script type="text/javascript">
//下载图片
$(".downloadImage").click(function() {
	var src=$(this).parent().prev().attr("src");
    var a = $("<a></a>").attr("href", src).attr("download", "img.png").appendTo("body");
    a[0].click();
    a.remove();
});
    
   //认真审核
var flag=true;
$(".authentication1").click(function() {
	if(flag){
		flag=false;
		var $this=$(this)
        var state=$(this).attr("state");
             $.ajax({
                    url : paths + "/feedback/updateState.html",
                    type : "POST",
                    dataType : "json",
                    data : {
                        "id" : $("#id").val(),
                        "state":state
                    },
                    success : function(datas) {
                    	var json=eval(datas);
                         layer.msg(json.msg, {time: 2000},function(){
                               flag=true; 
                               if(json.code==200){
                                   window.location="<%=path%>/feedback/list.html";
                               }
                           });
                    },
                    error : function(r, s, m) {
                    }
             });
	     }
    });	
</script>
</html>